\input ../../default-cn-cfg.mkvi
\input lib_subfigure.mkvi

\setupcombination[float][distance=1cm,
align=flushleft,color=red
]
\starttext

%  一组子图 1
\startplacefloat[figure] [title=FIgure TEST1,location=here]
  \startfloatcombination [nx=2,ny=2]
    \startplacefloat[subfigure][title=Left]   \externalfigure
    \stopplacefloat
    \startplacefloat[subfigure][title=Left]   \externalfigure
    \stopplacefloat
    \startplacefloat[subfigure] [title=Middle] \externalfigure
    \stopplacefloat
    \startplacefloat[subfigure] [title=Right]  \externalfigure
    \stopplacefloat
  \stopfloatcombination
\stopplacefigure

%  一组子图 2
\startplacefigure [title=FIgure TEST2,location=here]
  \startfloatcombination [nx=2,ny=2]
    \startplacefloat[subfigure][title=Left,reference=fig:left1]
      \externalfigure
    \stopplacefigure
    \startplacefloat[subfigure][title=Left]   \externalfigure
    \stopplacefigure
    \startplacefloat[subfigure] [title=Middle] \externalfigure
    \stopplacefigure
    \startplacefloat[subfigure] [title=Right,reference=fig:right1]
      \externalfigure
    \stopplacefigure
  \stopfloatcombination
\stopplacefigure
\par
请看 \in{figure}[fig:left1] and \in{figure}[fig:right1].

%  一组子图 2
\startplacefigure [title=FIgure TEST3,location=here]
  \startfloatcombination [nx=2,ny=2]
    \startplacefloat[subfigure][title=Left,reference=fig:left2]
      \externalfigure
    \stopplacefigure
    \startplacefloat[subfigure][title=Left]   \externalfigure
    \stopplacefigure
    \startplacefloat[subfigure] [title=Middle] \externalfigure
    \stopplacefigure
    \startplacefloat[subfigure] [title=Right,reference=fig:right2]
      \externalfigure
    \stopplacefigure
  \stopfloatcombination
\stopplacefigure
\par
\stoptext
